Skip to content

Conversation

james-rms
Copy link
Contributor

@james-rms james-rms commented Feb 18, 2025

Closes #7148.

Rationale for this change

Right now the object_store crate can't read an object in GCS with name [foo].

GoogleCloudStorage::get(&Path::from("[foo]") will see the object name percent encoded once in PathPart::from, then again in GoogleCloudStorageClient::object_url, and the resulting request URL will be double-encoded %255Bfoo%255D instead of %5Bfoo%5D.

This double-encoding seems like a bug to me. It probably doesn't affect clients who exclusively use the object_store crate (since the double encoding happens on read and write) but for those operating across multiple clients, this is a serious issue.

Fixing this bug will introduce a backwards-compatibility issue for users who have written double-encoded object paths into GCS using object_store. If this is not acceptable, I can add an option into the client and client builder to enable or disable this behavior.

What changes are included in this PR?

Are there any user-facing changes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

object_store: GCP object store cannot read objects with special characters in path
1 participant